using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Attachments
{
    /// <summary>
    /// <para>Remove Attachments</para>
    /// <para>Removes attachments from geodatabase feature class or table records. Since attachments are not actually stored in the input dataset, no changes will be made to that feature class or table, but rather to the related geodatabase table that stores the attachments and maintains linkage with the input dataset. A match table is used to identify which input records (or attribute groups of records) will have attachments removed.</para>
    /// <para>从地理数据库要素类或表记录中移除附件。由于附件实际上并未存储在输入数据集中，因此不会对该要素类或表进行任何更改，而是对存储附件并保持与输入数据集的链接的相关地理数据库表进行更改。匹配表用于标识哪些输入记录（或记录的属性组）将删除附件。</para>
    /// </summary>    
    [DisplayName("Remove Attachments")]
    public class RemoveAttachments : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RemoveAttachments()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>Geodatabase table or feature class from which to remove attachments. Attachments are not removed directly from this table, but rather from the related attachment table that stores the attachments. The Input Dataset must be in a version 10 or later geodatabase, and the table must have attachments enabled.</para>
        /// <para>要从中移除附件的地理数据库表或要素类。附件不会直接从此表中删除，而是从存储附件的相关附件表中删除。输入数据集必须位于版本 10 或更高版本的地理数据库中，并且表必须启用附件。</para>
        /// </param>
        /// <param name="_in_join_field">
        /// <para>Input Join Field</para>
        /// <para>Field from the Input Dataset that has values which match the values in the Match Join Field. Records that have join field values that match between the Input Dataset and the Match Table will have attachments removed. This field can be an Object ID field or any other identifying attribute.</para>
        /// <para>输入数据集中的字段，其值与匹配连接字段中的值匹配。如果记录的连接字段值在输入数据集和匹配表之间匹配，则将删除附件。此字段可以是“对象 ID”字段或任何其他标识属性。</para>
        /// </param>
        /// <param name="_in_match_table">
        /// <para>Match Table</para>
        /// <para>Table that identifies which input records will have attachments removed.</para>
        /// <para>用于标识哪些输入记录将删除附件的表。</para>
        /// </param>
        /// <param name="_in_match_join_field">
        /// <para>Match Join Field</para>
        /// <para>Field from the match table that indicates which records in the Input Dataset will have specified attachments removed. This field can have values that match Input Dataset Object IDs or some other identifying attribute.</para>
        /// <para>匹配表中的字段，用于指示输入数据集中的哪些记录将删除指定的附件。此字段的值可以与输入数据集对象 ID 或其他一些标识属性匹配。</para>
        /// </param>
        public RemoveAttachments(object _in_dataset, object _in_join_field, object _in_match_table, object _in_match_join_field)
        {
            this._in_dataset = _in_dataset;
            this._in_join_field = _in_join_field;
            this._in_match_table = _in_match_table;
            this._in_match_join_field = _in_match_join_field;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Remove Attachments";

        public override string CallName => "management.RemoveAttachments";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _in_join_field, _in_match_table, _in_match_join_field, _in_match_name_field, _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>Geodatabase table or feature class from which to remove attachments. Attachments are not removed directly from this table, but rather from the related attachment table that stores the attachments. The Input Dataset must be in a version 10 or later geodatabase, and the table must have attachments enabled.</para>
        /// <para>要从中移除附件的地理数据库表或要素类。附件不会直接从此表中删除，而是从存储附件的相关附件表中删除。输入数据集必须位于版本 10 或更高版本的地理数据库中，并且表必须启用附件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Input Join Field</para>
        /// <para>Field from the Input Dataset that has values which match the values in the Match Join Field. Records that have join field values that match between the Input Dataset and the Match Table will have attachments removed. This field can be an Object ID field or any other identifying attribute.</para>
        /// <para>输入数据集中的字段，其值与匹配连接字段中的值匹配。如果记录的连接字段值在输入数据集和匹配表之间匹配，则将删除附件。此字段可以是“对象 ID”字段或任何其他标识属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Join Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_join_field { get; set; }


        /// <summary>
        /// <para>Match Table</para>
        /// <para>Table that identifies which input records will have attachments removed.</para>
        /// <para>用于标识哪些输入记录将删除附件的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_match_table { get; set; }


        /// <summary>
        /// <para>Match Join Field</para>
        /// <para>Field from the match table that indicates which records in the Input Dataset will have specified attachments removed. This field can have values that match Input Dataset Object IDs or some other identifying attribute.</para>
        /// <para>匹配表中的字段，用于指示输入数据集中的哪些记录将删除指定的附件。此字段的值可以与输入数据集对象 ID 或其他一些标识属性匹配。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Join Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_match_join_field { get; set; }


        /// <summary>
        /// <para>Match Name Field</para>
        /// <para>Field from the match table that has the names of attachments to remove from Input Dataset records. If no name field is specified, all attachments will be removed from each record specified in the Match Join Field. If a name field is specified, but a record has a null or empty value in the name field, all attachments will be removed from that record. This field's values should be the short names of the attachment to remove, not the full paths to the files used to make the original attachments.</para>
        /// <para>匹配表中的字段，其中包含要从输入数据集记录中删除的附件的名称。如果未指定名称字段，则将从“匹配连接字段”中指定的每条记录中删除所有附件。如果指定了名称字段，但记录的名称字段中具有空值或空值，则将从该记录中删除所有附件。此字段的值应该是要删除的附件的短名称，而不是用于制作原始附件的文件的完整路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_match_name_field { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public RemoveAttachments SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}